<script setup>
import { onShow, onError } from '@dcloudio/uni-app';
import '@/static/styles/base.css';

onError((err) => {
  console.error('AppOnError:', err);
});

onShow((options) => {
  console.debug('AppOnShow:', options);

  const key = uni.getStorageSync('token');

  if (key) {
    uni.redirectTo({
      url: '/pages/module-home/index',
    });
  } else {
    uni.redirectTo({
      url: '/pages/module-login/index',
    });
  }
});
</script>
<style lang="scss">
@import 'uview-plus/index.scss';
@import url('static/styles/tailwind.css');
</style>
